{%mainunit bitcoin_p2p.pas}

{$IFDEF INTERFACE}
type
  { TMsgVerack has an empty parse method, only Serialize is actually
    used to send such a message and even that does nothing other than call
    WrapHeader wih empty data. }
  TMsgVerack = class(TMsg)
    constructor Create;
    procedure ParseAndProcess; override;
    function Serialize: String; override;
    class function GetCommand: Tp2pCommand; override;
  end;

{$ENDIF}
{$IFDEF IMPLEMENTATION}

{ TMsgVerack }

class function TMsgVerack.GetCommand: Tp2pCommand;
begin
  Result := 'verack'#0#0#0#0#0#0;
end;

constructor TMsgVerack.Create;
begin
  // nothing
end;

procedure TMsgVerack.ParseAndProcess;
begin
  // nothing
end;

function TMsgVerack.Serialize: String;
begin
  // empty body, only short header
  Result := WrapHeader('', True);
end;

{$ENDIF}
